package com.lc.YYGH.hosp.controller;

import com.lc.YYGH.common.result.Result;
import com.lc.YYGH.hosp.service.DepartmentService;
import com.lc.YYGH.hosp.service.LawerService;
import com.lc.YYGH.model.office.Lawer;
import com.lc.YYGH.vo.hosp.DepartmentVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("admin/hosp/lawer")
public class LawerController {
    @Autowired
    private LawerService lawerService;
    @ApiOperation(value="查询事务所中的所有律师")
    @GetMapping("getLawerList/{page}/{limit}/{officecode}")
    public Result getLawerList(
            @PathVariable int page,
            @PathVariable int limit,
            @PathVariable String officecode)
    {
        return Result.success(lawerService.getLawerList(page,limit,officecode));
    }
    @ApiOperation(value ="获取律师详情" )
    @GetMapping("show/{id}")
    public Result show(
            @ApiParam(name="id",value="律师id",required = true)
            @PathVariable String id)
    {
        System.out.println(""+id);
        return Result.success(lawerService.getDetail(id));
    }

}

